package miao.demo.service.impl;

import miao.demo.dao.BookDao;
import miao.demo.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service()
public class BookServiceImpl implements BookService {
    @Autowired()
    @Qualifier("bookDao2")
    private BookDao bookDao;

    //@Value("大喵")
    @Value("${name}") //读取配置文件的值
    private String name;

    @Override
    public void save() {
        System.out.println("book service save..." + name);
        bookDao.save();
    }
}
